#ifndef QTUI_QT_SELECTION_VIEW_BASE_HPP
#define QTUI_QT_SELECTION_VIEW_BASE_HPP

#include "QtUI/QtUIConfig.hpp"
#include "AbsUI/SelectionView.hpp"
#include <boost/noncopyable.hpp>

namespace QtUI
{

	namespace Impl { class QtSelectionViewImpl; }

/// @ingroup QtUI
/// @brief It provides the integration of abstract AbsUI::SelectionView to QT framework.
///
/// For more details, see @ref ViewMechanisms_QtIntegration "Integration of view mechanisms in QT framework"
class QTUI_API QtSelectionViewBase: public AbsUI::SelectionView, private boost::noncopyable
{
	friend class Impl::QtSelectionViewImpl;
public:
	/// @sa AbsUI::SelectionView::SelectionView( Ctrl::SelectionModel&)
	QtSelectionViewBase( Ctrl::SelectionModel& rModel);

	/// @brief It deletes the implementation object.
	virtual ~QtSelectionViewBase();

	/// @brief It signals the change selection signal of the implementation object.
	/// @sa AbsUI::SelectionView::changeSelection( Ctrl::SelectionModel&)
	virtual void changeSelection( const Ctrl::SelectionModel& );

protected:
	/// @brief It handles the selection change event. Subclasses should specialize this method.
	///
	/// This handler is called asynchronously, in the UI thread.
	virtual void handleSelectionChanged( const Ctrl::SelectionModel& changedSelection) = 0;

private:
	Impl::QtSelectionViewImpl* pImpl_;
};


} // namespace QtUI

#endif // QTUI_QT_SELECTION_VIEW_BASE_HPP
